<%@ page language="java" pageEncoding="utf-8"%>
<%@ page import="java.util.*"%>
<%@ page import="javax.servlet.http.HttpServletRequest"%>
<%@ page
	import="org.jbit.bean.*,org.jbit.biz.*,org.jbit.dao.*,org.jbit.vo.*"%>
<%
String ModuleMark =request.getParameter("ModuleMark");
 GPSInfoListAction GA = new GPSInfoListAction();
 List<GPSInfoVo> list=new ArrayList<GPSInfoVo>();
 list=GA.getGPSInfoListShow(ModuleMark);
%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
<script type="text/javascript" src="../js/jquery/jquery-1.9.1.js"></script>
<script type="text/javascript" src="../js/jquery/jquery.jqGrid.min.js"></script>
<script type="text/javascript" src="http://api.map.baidu.com/api?key=&v=1.1&services=true"></script> 
<title>痕迹标记</title>
<script type="text/javascript">
function insit() {
var latitudeList = new Array();
var longitudeList = new Array();
var timeList = new Array();
<%int o=0;%>
<%for(int j=0;j<list.size();j++)
    {
     GPSInfoVo info=new GPSInfoVo();
	 info=list.get(j);
	 %>
	latitudeList.push(<%=info.getLatitude()%>);
    longitudeList.push(<%=info.getLongitude()%>);
    timeList.push("<%=info.getUTCTime()%>");
<%}%>
	for (var i=0;i<<%=list.size()%>;i++)
	{
	var gc = new BMap.Geocoder();
	Latitude=latitudeList[i];
	Longitude=longitudeList[i];
	
	var pt = new BMap.Point(parseFloat(Longitude),parseFloat(Latitude));
	gc.getLocation(pt, function(rs) {
	
	var addComp = rs.addressComponents;
	listData = addComp.province + addComp.city + addComp.district+ addComp.street + addComp.streetNumber + "   ";
	var time=timeList[--i];
	var table = $('#infotable'); 
    var row = $("<tr></tr>"); 
    var td1 = $("<td></td>"); 
    var td2 = $("<td></td>");
    var td3 = $("<td></td>"); 
    var td4 = $("<td></td>");
    td1.append($("<textarea style='width:200px; height:20px;' readonly>"+time+"</textarea >"));
    td2.append($("<textarea style='width:100px; height:20px;' readonly>"+longitudeList[i]+"</textarea >")); 
    td3.append($("<textarea style='width:100px; height:20px;' readonly>"+latitudeList[i]+"</textarea >")); 
    td4.append($("<textarea style='width:300px; height:20px;' readonly>"+listData+"</textarea >")); 
	row.append(td1); 
	row.append(td2);
	row.append(td3); 
	row.append(td4); 
	table.append(row); 
	});
		};
	}
</script>
<link rel="stylesheet" type="text/css" href="../css/table.css" />
</head>
<body onload="insit()">
	<div id="infoList" align="center">
	<table id="infotable">
	<tr><th>时间</th><th>经度</th><th>纬度</th><th>位置</th></tr>
	
	
	</table>
	</div>
</body>
</html>
